 
	***************************************************************
	**															 **
	** Paper: Freedom of Foreign Movement and Human Trafficking  **
	**														     **
	** Authors: Sam R. Bell & Richard W. Frank 				 	 **
	**															 **
	** Date: May 11, 2021										 **
	**															 **
	** Task: Figure A8-Country-years included in Models 3 & 4 	 **
	**															 **
	***************************************************************
					 
		clear
		version 16.1
		set seed 1234

		** change working directory
		cd "~"
	  
		use "ht_merged.dta"
		merge 1:1 ccode year using "ht_eba_ivs.dta"
		eststo clear	 
		gen homi =ln(homicides)
		global IVs "gdp_ln pop_ln " 
		sort ccode year
		tsset ccode year

		probit F.source v2clfmove W_vfomov_con12  $IVs , robust cluster (ccode)
		gen included=0
		replace included=1 if e(sample)
		keep if included==1	 
		keep country year included ccode
		replace country="Cote d'Ivoire" if country=="Cote D'Ivoire"
		replace country="Equatorial Guinea" if country=="Equatorial Quinea"
		by ccode: gen first=1 if _n==1
		by ccode: gen last=1 if _n==_N
		replace first=year if first==1
		replace last=year if last==1
			
		collapse (first) country (max)  first last, by(ccode)
		
		gen start=first+1
		gen finish=last+1
			 
		graph dot start finish, over(country) ylabel(2000(2)2018, labsize(small)) ///
			exclude0  xsize(10) ysize(16) linetype(line) lines(lwidth(vvthin)) legend(off)
		 
		browse country year source v2clfmove W_vfomov_con12  $IVs if country=="Congo, Democratic Republic"
				 
				 
				 
				 
				 
